home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_bab_tabletpickup.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  136 lines

  1. # Jones 3D Cog Script
  2. #
  3. # BAB_TabletPickup.cog
  4. #
  5. # Indy picks up tablets & comments
  6. #
  7. # [SXC & revised by HB]
  8. #
  9. # 11/23/98 SXC
  10. #
  11. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  12. #
  13. # ========================================================================================
  14.  
  15. symbols
  16.  
  17.     message     startup
  18.     message     activate
  19.     message        user7
  20.     
  21.     sound        in_whatsthis=Inxj140.wav    local
  22.     sound        in_hmm=Inxj146.wav            local
  23.     sound        in_aha=Inxj147.wav            local
  24.     sound        in_tabpart=Inxj171.wav        local
  25.     sound        in_textfrag=Inxj172.wav        local
  26.     sound        in_moretext=Inxj240.wav        local
  27.  
  28.     thing       player                        local
  29.     thing       tablet
  30.     thing       swingpos    
  31.     
  32.     cog            archivebridgecog    
  33.     
  34.     int         itemnum       
  35.     int         croscheck=0                    local
  36.     int         cursound                    local 
  37.     int            bridgedown=0                local
  38.              
  39. end
  40.  
  41. # ==============================================================================
  42.  
  43. code
  44.  
  45. ## NOTE:  this cog uses--> global6 <--to sequence saylines
  46.  
  47. startup:
  48.  
  49.     player = GetLocalPlayerThing();
  50.     global6 = 0; # init
  51.  
  52.     return;
  53.            
  54. # ..............................................................................
  55.  
  56. user7:
  57.  
  58.     # NOTE: received from archivebridgecog when bridge has collapsed
  59.     bridgedown = 1;
  60.  
  61.     return;
  62.  
  63. # ..............................................................................
  64.  
  65. activate:
  66.  
  67.     If ((GetSenderRef() == tablet) && (croscheck == 0) && (GetCurItem(player) == 0) && (GetCurWeapon(player) == 0))
  68.     {
  69.         croscheck = 1;
  70.         MakeMeStop();
  71.         StartCutscene(0);
  72.         PlayMode(player, 60, 0);
  73.  
  74.         SetExtCamOffsetToThing(swingpos);
  75.  
  76.         if (global6 == 0)
  77.         {    
  78.             PlayVoice(player, in_whatsthis, 1.0, 1);
  79.         }
  80.         if (global6 == 1)
  81.         {
  82.             PlayVoice(player, in_hmm, 1.0, 1);        
  83.         }
  84.         if (global6 == 2)
  85.         {
  86.             PlayVoice(player, in_aha, 1.0, 1);        
  87.         }
  88.         Sleep(0.35);
  89.  
  90.         DestroyThing(tablet);
  91.         ChangeInv(player, itemnum, 1);
  92.         SetInvAvailable(player, itemnum, 1);
  93.         JonesInvItemChanged(itemnum);
  94.         Sleep(0.5);
  95.         
  96.         if (global6 == 0)
  97.         {    
  98.             cursound = PlayVoice(player, in_tabpart, 1.0, 0);
  99.         }
  100.         if (global6 == 1)
  101.         {
  102.             cursound = PlayVoice(player, in_textfrag, 1.0, 0);
  103.         }
  104.         if (global6 == 2)
  105.         {
  106.             cursound = PlayVoice(player, in_moretext, 1.0, 0);
  107.         }
  108.  
  109.         if (global6 < 2)
  110.         {
  111.             global6 = global6 + 1;
  112.         }
  113.  
  114.         WaitForSound(cursound);
  115.         Sleep(0.5);
  116.  
  117.         //allow bridge to fall...
  118.         if (itemnum == 69)
  119.         {
  120.             SendMessage(archivebridgecog, user6);
  121.             while (bridgedown == 0)
  122.             {
  123.                 Sleep(0.1);
  124.             }
  125.         }
  126.  
  127.         RestoreExtCam();
  128.         Sleep(0.5);
  129.         EndCutscene();
  130.         ClearActorFlags(player, 0x200000);
  131.     }
  132.     
  133.     return;
  134.         
  135. end
  136.